#include <stdio.h>
// 两个等长数组，交换两个数组的内容
//  创建一个整形数组，初始化元素为0   打印数组中的每个元素    将数组中的元素翻转
int main()
{
    int arr1[] = {1, 3, 5, 7, 9};
    int arr2[] = {2, 4, 6, 8, 0};
    int i = 0;
    int j = 0;
    int sz = sizeof(arr1) / sizeof(arr1[0]);
    for (j = 0; j < sz; j++)
    {
        printf("%d ", arr1[j]);
    }
    printf("\n");

    for (j = 0; j < sz; j++)
    {
        printf("%d ", arr2[j]);
    }
    printf("\n");
    for (i = 0; i < sz; i++)
    {
        int temp = 0;
        temp = arr1[i];
        arr1[i] = arr2[i];
        arr2[i] = temp;
    }
    for (j = 0; j < sz; j++)
    {
        printf("%d ", arr1[j]);
    }
    printf("\n");

    for (j = 0; j < sz; j++)
    {
        printf("%d ", arr2[j]);
    }
    printf("\n");
    return 0;
}